import {
  request
} from '@/utils/request'

// 登录
// export function login(data) {
//   return request.post('/tcs/carrier/login/smsCode', data)
// }

export function login(data) {
  return request.post('/auth/login/slide', data)
}

// 用户信息 
// export function getUserInfo(data) {
//   return request.get('/tcs/carrier/app/driver/getInfo', data)
// }

// export function getUserInfo(data) {
//   return request.get('/system/user/info', data)
// }
export function getUserInfo(data) {
  return request.get('/front/wx/user/login/' + data)
}

export function getUserInfo2(data) {
  return request.get('/front/wx/user/getUserInfo', {})
}

export function saveUserInfo(data) {
  return request.post('/portal/wx/user/save', data)
}

export function getCaptcha(data) {
  return request.get(
    '/auth/captcha/captchaImage?lang=zh-CN', data
  )
}
// 获取APP更新
export function getAppInfo (data) {
  return request.get('/app/mine/getLatestAppInfo', data)
}

// 隐私协议
export function getAgreement (data) {
  return request.get('/auth/agreement', data)
}

export function register(data) {
  return request.post('/front/wx/user', data)
}

export function pay(data) {
  return request.post('/order/wx/entPay', data)
}

export function acceptLaw(data) {
  return request.post('/front/wx/user/acceptLaw', {})
}

